////////////////////////////////////////////////////////////////////////////
//
//  Crytek Engine Source File.
//  Copyright (C), Crytek Studios, 2002.
// -------------------------------------------------------------------------
//  File name:   CommandPlayerFmodEx400.h
//  Version:     v1.00
//  Created:     8/11/2006 by Tomas
//  Compilers:   Visual Studio.NET
//  Description: FmodEx 4.00 Implementation of a Command Player
// -------------------------------------------------------------------------
//  History:
//
////////////////////////////////////////////////////////////////////////////
#ifndef __COMMANDPLAYERFMODEX400_H__
#define __COMMANDPLAYERFMODEX400_H__

#ifdef SOUNDSYSTEM_USE_FMODEX400
#include <FmodEx/inc/fmod.hpp>
#include <FmodEx/inc/fmod_event.hpp>
#endif // SOUNDSYSTEM_USE_FMODEX400

#define	FMOD_COMMAND_PLAYER_MAX_COMMANDS 256

class CCommandPlayerFmodEx400
{
	
public:	
	
	CCommandPlayerFmodEx400();
	~CCommandPlayerFmodEx400();

	enum eCOMMANDS
	{ 
		NONE,
		SYSTEM_,
		SYSTEM_SETOUTPUT,
		SYSTEM_SETDRIVER,
		SYSTEM_SETRECORDDRIVER,
		SYSTEM_SETHARDWARECHANNELS,
		SYSTEM_SETSPEAKERMODE,
		SYSTEM_SET3DSETTINGS,
		EVENTSYSTEM_CREATE,
		EVENTSYSTEM_INIT,
		EVENTSYSTEM_UPDATE,
		EVENTSYSTEM_SET3DNUMLISTENERS,
		EVENTSYSTEM_SET3DLISTENERSATTRIBUTES,
		EVENTSYSTEM_LOAD,
		EVENTSYSTEM_UNLOAD,
		EVENTSYSTEM_RELEASE,
		EVENTSYSTEM_GETSYSTEMOBJECT,
		EVENTSYSTEM_SETMEDIAPATH,
		PROJECT_,
		PROJECT_GETGROUP,
		GROUP_,
		GROUP_GETEVENT,
		GROUP_FREEDATA,
		GROUP_FREEEVENTDATA,
		EVENT_,
		EVENT_PLAY,
		EVENT_STOP,
		EVENT_SETPAUSED,
		EVENT_SETVOLUME,
		EVENT_SET3DATTRIBUTES,
		EVENT_GETPARAMETER,
		PARAMETER_,
		PARAMETER_SETVALUE,
		CATEGORY_
	}; 

void RecordFile(const char* sFilename);
bool IsRecording() const {return m_bRecording;}
void StopRecording() {m_bRecording = false;}

void LogCommand(eCOMMANDS const command, int const nMilliSecs, ptParam const& rParam1 = ptParamUINT32(0), ptParam const& rParam2 = ptParamUINT32(0), ptParam const& rParam3 = ptParamUINT32(0), ptParam const& rParam4 = ptParamUINT32(0), ptParam const& rParam5 = ptParamUINT32(0));
//void PlayCommand(const eCOMMANDS command, const int nMilliSecs, void* pParam1=0, void* pParam2=0, void* pParam3=0, void* pParam4=0);

private:

#ifdef SOUNDSYSTEM_USE_FMODEX400
	FMOD::System*       m_pFMODEX;
	FMOD::EventSystem*  m_pEventSystem;
	FMOD_RESULT         m_ExResult;
	FMOD_CAPS           m_nFMODDriverCaps;
	FMOD_SPEAKERMODE    m_nSpeakerMode;
#endif // SOUNDSYSTEM_USE_FMODEX400
		
	FILE*       m_pFile;
	bool        m_bRecording;
	static char m_sCommand[FMOD_COMMAND_PLAYER_MAX_COMMANDS];
	int         m_nfModDriverType;
	int         m_nCurrentMemAlloc;
	int         m_nMaxMemAlloc;
};

#endif

